﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace ConsoleApplication1
{
    class Program
    {
        static void Main(string[] args)
        {
            List<Class1> cl = new List<Class1>();
            cl.Add(new Class1());
            cl.Add(new Class2());
            cl.Add(new Class3());
            cl.ForEach(c => Console.WriteLine(c.level()));
            cl.ForEach(c => Console.WriteLine(c.GetType()));
            cl.ForEach(c => Console.WriteLine(c is Class2));
            for (; ; ) ;
        }
    }
}
